#pragma once
#include <string>
#include <time.h>
#include <iostream>
#include "VehicleException.h"

using namespace std;
class Vehicle
{
protected:
	string brand;
	int year;
	double purchasingPrice;
	double sellingPrice;
public:

	Vehicle(void)
	{
		this->brand = "";
		this->year = 0;
		this->purchasingPrice = 0;
		this->sellingPrice = 0;
	}

	Vehicle( string brand, int year, double purchasingPrice, double sellingPrice)
	{
		this->brand = brand;
		this->year = year;
		this->purchasingPrice = purchasingPrice;
		this->sellingPrice = sellingPrice;

		if( this->year < 1886 || this->year >2014 )
			throw VehicleException("Make Year is out of range");
	}

	~Vehicle(void)
	{
	}

	virtual void Print( ostream& out )
	{
		out << "Vehicle:" << endl;
		out << "Brand - " << this->GetBrand() << endl;
		out << "Year - " << this->GetYear() << endl;
		out << "Purchasing price - " << this->GetPurchasingPrice() << " Thousand SEK" << endl;
		out << "Selling Price - " << this->GetSellingPrice() << " Thousand SEK" << endl << endl;
	}

#pragma region Getters
	string GetBrand() { return this->brand; }
	int GetYear() { return this->year; }
	double GetPurchasingPrice() { return this->purchasingPrice; }
	double GetSellingPrice() { return this->sellingPrice; }  
#pragma endregion


	
#pragma region Setters
	void SetBrand( string brand ) { this->brand = brand; }
	void SetYear( int year ) { this->year = year; }
	void SetPurchasingPrice( double price ) { this->purchasingPrice = price; }
	void SetSellingPrice( double price ) { this->sellingPrice = price; }  
#pragma endregion

};

